#!/usr/bin/python
# -*- coding: utf-8 -*-

'''
Introduction to Programming in Java - An Interdisciplinary Approach

All book programs ported to Python by
Scott C. King (revisionx at {gee}ma1l <dot> c0m).

All program examples pass Pylint with a perfect 10.00 score.
Pylint:  http://www.pylint.org/

Exercise 1.4.10 - Write a program Deal that takes an command-line argument N
and prints N poker hands (five cards each) from a shuffled deck, separated
by blank lines.


Syntax:
python deal.py


Information on Python's random module:
https://docs.python.org/2/library/random.html

Going to use some of Python's built ins here...

'''
import random


def main():
    ''' Deal N hands from a shuffled deck of cards '''

    suits = ['Clubs', 'Diamonds', 'Hearts', 'Spades']
    ranks = ['2', '3', '4', '5', '6', '7', '8', '9', '10', 'Jack',
             'Queen', 'King', 'Ace']
    deck = []
    for suit in suits:
        for rank in ranks:
            deck.append(rank + ' of ' + suit)

    random.shuffle(deck)
    for _ in range(5):
        print deck.pop()

if __name__ == '__main__':
    main()
